<%@ page contentType='text/html; charset=iso-8859-1' language="java"%>
<%@ page pageEncoding="UTF-8"%>
<%@ include file="../WEB-INF/jspf/cabecalho.jspf" %>
<%@ include file="../WEB-INF/jspf/acesso.jspf" %>
<%@ include file="../WEB-INF/jspf/setMeta.jspf" %>



<sql:query var='rsetSol' dataSource='${con}'>
    
    SELECT * FROM Solicitacao WHERE ( Solicitacao.cliente LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.municipio LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.solicitante LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.email LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.setor LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.telefone LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.estado LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.assunto LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.descricao LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.equipe LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.tecnico LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.atendenteInicial LIKE '%<c:out value="${param.criterio}"/>%'
    OR Solicitacao.tecnicoFinalizacao LIKE '%<c:out value="${param.criterio}"/>%'
    OR Solicitacao.atendenteArquivamento LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.observacoes LIKE '%<c:out value="${param.criterio}"/>%' 
    OR Solicitacao.idSolicitacao LIKE '%<c:out value="${param.criterio}"/>%') 
    AND Solicitacao.status='Arquivada'
    ORDER BY `idSolicitacao` ASC 
    
</sql:query> 

<form name="form1" method="post" action="">
  <fieldset>
  <legend><font color="#0000FF"><strong>Resultado da Busca por "<c:out value="${param.criterio}"/>"</strong></font></legend>
  <br/>
  <table width="100%" border="1" bordercolor="#0000FF">   
    <tr bgcolor="#00CCFF"> 
      <td width="8%"><div align="center"><strong>N&uacute;mero</strong></div></td>
      <td width="40%"><div align="center"><strong>Solicitante</strong></div></td>
      <td width="8%"><div align="center"><strong>Data</strong></div></td>
      <td width="8%"><div align="center"><strong>Hora</strong></div></td>
      <td width="8%"><div align="center"><strong>Status</strong></div></td>
      <td width="8%"><div align="center"><strong>Equipe</strong></div></td>
      <td width="20%"><div align="center"><strong>T&eacute;cnico</strong></div></td>
      <td width="10%" colspan="6"><div align="center"><strong>Manuten&ccedil;&atilde;o</strong></div></td>
    </tr>
    <c:forEach var="row" items="${rsetSol.rowsByIndex}">
        <tr> 
            <td><div align="left"></div>${row[0]}</td>
            <td><div align="left"></div>${row[5]}</td>
            <td><div align="left"></div>${row[1]}</td>
            <td><div align="left"></div>${row[2]}</td>
            <td><div align="left"></div>${row[15]}</td>
            <td><div align="left"></div>${row[13]}</td>
            <td><div align="left"></div>${row[14]}</td>
            <td><div align="center"><a href="visualizarSolicitacao.jsp"><img src="imagens/icones/visualizar.gif" alt="Visualizar a solicita&ccedil;&atilde;o" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><a href="delegarSolicitacao.jsp"><img src="imagens/icones/delegar.gif" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><a href="editarSolicitacao.jsp"><img src="imagens/icones/editar.gif" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><a href="finalizarSolicitacao.jsp"><img src="imagens/icones/finalizar.gif" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><a href="arquivarsolicitacao.jsp"><img src="imagens/icones/arquivar.gif" width="16" height="16" border="0" /></a></div></td>
            <td><div align="center"><a href="visualizarHistorico.jsp"><img src="imagens/icones/historico.gif" width="16" height="16" border="0" /></a></div></td>
        </tr>
    </c:forEach>
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  </fieldset>
</form>

</body>
</html>
